package com.bootdo.system.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bootdo.system.domain.TbSidMessage;
import com.bootdo.system.mapper.TbSidMessageMapper;
import com.bootdo.system.service.SidMsgService;

@Service
public class SidMsgServiceImpl implements SidMsgService{
	
	@Autowired
    private TbSidMessageMapper sm;

	@Override
	public List<TbSidMessage> wxMsgList(Map<String, Object> map) {
		return sm.list(map);
	}

	@Override
	public int count(Map<String, Object> map) {
		return sm.count(map);
	}

	@Override
	public int insert2update(TbSidMessage table) {
		int res=0;
		if(table != null) {
			Integer id = table.getId();
			if(id != null) {
				res=sm.updateByPrimaryKeySelective(table);
			}else {
				res=sm.insertSelective(table);
			}
		}
		return res;
	}

}
